package com.mianshi;

/**
 * 求n的阶乘
 */
public class mijia2 {
    public static void main(String[] args) {
        long n = 4;
        long sum = cal(n);
        System.out.println(sum);
    }

    public static long cal(long n){
        if(n == 1){
            return 1;
        }
        return n * cal(n-1);
    }
}
